
<script type="text/javascript" src="{{$LAYOUT_HELPER_URL}}admin/js/ckfinder/ckfinder.js"></script> 
                        
<script type="text/javascript">

$().ready(function() {
    // validate signup form on keyup and submit
//    $("#register").validate({
//        rules: {
//            'data[name]': "required"
//        },
//        messages: {
//            'data[name]': ""
//        }
//    }); 
});

function chooseImage()
{
    // You can use the "CKFinder" class to render CKFinder in a page:
    var finder = new CKFinder();
    finder.basePath = '{{$LAYOUT_HELPER_URL}}admin/js/ckfinder/'; // The path for the installation of CKFinder (default = "/ckfinder/").
    finder.selectActionFunction = SetFileField;
    finder.popup();

    // It can also be done in a single line, calling the "static"
    // Popup( basePath, width, height, selectFunction ) function:
    // CKFinder.Popup( '../../', null, null, SetFileField ) ;
    //
    // The "Popup" function can also accept an object as the only argument.
    // CKFinder.Popup( { BasePath : '../../', selectActionFunction : SetFileField } ) ;
} 
// This is a sample function which is called when a file is selected in CKFinder.
function SetFileField( fileUrl )
{
    document.getElementById( 'chooseImage_img' ).src = fileUrl;
    document.getElementById( 'chooseImage_input' ).value = fileUrl;
    document.getElementById( 'chooseImage_div').style.display = '';
    document.getElementById( 'chooseImage_noImage_div' ).style.display = 'none';
}
function clearImage()
{
    document.getElementById( 'chooseImage_img').src = '';
    document.getElementById( 'chooseImage_input' ).value = '';
    document.getElementById( 'chooseImage_div' ).style.display = 'none';
    document.getElementById( 'chooseImage_noImage_div').style.display = '';
}
</script>
            <div class="content-box"><!-- Start Content Box -->
                
                <div class="content-box-header">
                    
                    <h3>Setting Summary</h3>
                    
                    
                    
                    <div class="clear"></div>
                    
                </div> <!-- End .content-box-header -->
                
                <div class="content-box-content">
                
                	
                    <form action="" method="post"  name="register" id="register">
                    
                    <div class="tab-content" id="tab1">
                    
                        <!-- ERROR -->
                        {{if !($data.name && $data.portal_alias && $users.username && $data.image)}}
	                        <div class="notification error png_bg">
								<a class="close" href="#"><img alt="close" title="Close this notification" src="{{$LAYOUT_HELPER_URL}}admin/images/icons/cross_grey_small.png"></a>
								<div>
									Some fields are missing.
									Please <a href="{{$APP_BASE_URL}}portal/admin/edit/id/{{$data.portal_id}}">click here</a> to edit portal before generating it.
								</div>
							</div>
                        {{/if}}
                            <!-- Portal's fields -->
                            <form>
                            		<p><label class="w155">Portal's Name: </label> {{$data.name}}
                                    <br/>
                                    <p><label class="w155">Portal's Alias: </label>  {{$data.portal_alias}}
                                    <br/>
                                    <p><label class="w155">Manager: </label> {{$users.username}}
                                    <br/>
                                    <p></p><label class="w155">Portal Logo:</label>
                                    <div style="float: left; margin: 10px;" id ="image_div">
                                    
                                            <div id="chooseImage_div" style="{{if !$data.image}} display:none{{/if}}">
                                                <img src="{{$BASE_URL}}{{$data.image}}" id="chooseImage_img" style="max-width: 444px; border:dashed thin;"></img><br/>
                                            </div>
                                            <div id="chooseImage_noImage_div" style="width: 444px; border: thin dashed; text-align: center; padding:70px 0px; {{if $data.image}} display:none{{/if}} ">
                                                No image
                                            </div>
                                    </div>
                             </form>     
                                    <br style="clear: both;"/>  
                                    <br/>   
                            <!-- END fields -->
                            <p>
                            
                            <br/>
                                <input class="button" type="button" value="&laquo; Back" onclick="javascript:history.back();"/>
                                {{if $data.name && $data.portal_alias && $users.username && $data.image}}
                                	<input class="button" type="submit" value="Generate" />
                                {{/if}}
                            </p>
                            <div class="clear"></div><!-- End .clear -->
                            
                    </div>  <!-- End #tab1 --> 
                    
                      
                  </form>
                </div> <!-- End .content-box-content -->
                
            </div> <!-- End .content-box -->
            
            
            <div class="clear"></div>